<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>工作计划</title>
<link href="/widget/bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet"  type="text/css"/>
<link href="/widget/iconfont/iconfont.css" rel="stylesheet" />
 {cssjs}
<link href="/res/css/inside_page.css" rel="stylesheet"  type="text/css"/>
<script language="javascript" type="text/javascript" src="/widget/datepicker/WdatePicker.js"></script>
</head>

<body>
<div class="container-fluid larry-wrapper">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12">
            <!--头部搜索-->
            <section class="panel panel-padding">
                <form class="layui-form" method="post">
                    <div class="layui-form">
						<div class="layui-form-item">
							<div class="layui-input-inline" style="width:120px;">
							  <select name="type" id="type">
                                <option value="">所有类型</option>
                                <!-- START types -->
								<option value="{id}">{name}</option>
                                <!-- END types -->
							  </select>
							</div>
                            <div class="layui-input-inline" style="width:120px;">
                              <select name="typeuid" id="typeuid">
                                <option value="create">我创建的计划</option>
                                <option value="join">我参与的计划</option>
                              </select>
                            </div>
							<div class="layui-input-inline">
                              <input type="button" lay-submit class="layui-btn" lay-filter="search" id="btn_search"value="查找"/>
                            </div>
						</div>    
                    </div>
                </form>
            </section>

            <!--列表-->
                <section class="panel panel-padding">
                    <div class="group-button">
                        <button class="layui-btn layui-btn-small modal-iframe" id="btn_add">
                            <i class="iconfont">&#xe649;</i> 新建计划
                        </button>
                        <button class="layui-btn layui-btn-small layui-btn-danger ajax-all" id="btn_del">
                            <i class="iconfont">&#xe626;</i> 删除
                        </button>
                        <button class="layui-btn layui-btn-small layui-btn-warm ajax-all" id="btn_ref">
                            <i class="iconfont">&#xe62e;</i> 刷新
                        </button>
                    </div>
                    <div class="layui-form">
                        <table class="layui-table lay-even tbfix">
                            <thead>
                                <tr>
                                    <th width="50"><input type="checkbox" id="checkall" data-name="checkbox" lay-filter="check" lay-skin="primary"></th>
                                    <th width="150px">名称</th>
									<th width="100">计划类型</th>
                                    <th width="120">开始日期</th>
                                    <th width="120">结束日期</th>
                                    <th width="120">开放部门</th>
                                   <!--  <th style="text-align: center;">开放人员</th> -->
                                    <th width="80">负责人</th>
									<th width="170" style="text-align:center;">创建时间</th>
                                    <th width="100">状态</th>
                                    <th width="300" id="caozuo" style="text-align:center;">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                               {str_html}
                            </tbody>
                        </table>
                    </div>
                </section>
				<div class="text-right" id="page" style="margin-top:-25px;">
			        <ul class="pagination pull-right">
                        {page}
				    </ul>
                </div>
         </div>
     </div>
</div>
    {jsmodel}
   <script type="text/javascript">
        layui.use('plan_sys');

        $().ready(function(){
            $('td').each(function(){
                var td = $(this).html();
                td = td.replace(/^\s+/,"");
                $(this).html(td);
                if($(this).html()==''){
                    $(this).html('-');
                    $(this).css('text-align','center');
                }
            })
            var type = '{type}';
            var typeuid = '{typeuid}';
            var start_date = '{start_date}';
            var end_date = '{end_date}';
            if(typeuid=='join')$('#caozuo').css('width','70px');
            $('#type').val(type);
            $('#typeuid').val(typeuid);
            $('#start_date').val(start_date);
            $('#end_date').val(end_date);
            $("#btn_search").bind("click",function(){   
                var type=$("#type").val();
                var typeuid=$("#typeuid").val();
                var start_date=$("#start_date").val();
                var end_date=$("#end_date").val();
                location.href="?t=plan_sys&type="+type+"&typeuid="+typeuid+"&start_date="+start_date+"&end_date="+end_date;
            }); 
        });
		
    </script>
</body>
</html>
